<?php

use Illuminate\Support\Facades\Route;
use Modules\Member\Http\Controllers\CooperateController;
use Modules\Member\Http\Controllers\MemberGroupsController;
use Modules\Member\Http\Controllers\MembersController;
use Modules\Member\Http\Controllers\MembersPriceLogController;
use Modules\Member\Http\Controllers\MembersVirtualController;

Route::prefix('member')->group(function () {

    Route::get('members/agent_list', [MembersController::class, 'agentList']);
    Route::get('members/agent_list/{id}', [MembersController::class, 'agentShow']);
    Route::post('members/agent_list', [MembersController::class, 'agentUpdate']);
    Route::put('members/agent_list/{id}', [MembersController::class, 'agentUpdate']);
    Route::delete('members/agent_list/{id}', [MembersController::class, 'agentDelete']);
    Route::apiResource('members', MembersController::class);
    Route::apiResource('members_virtual', MembersVirtualController::class);
    Route::put('members/enable/{id}', [MembersController::class, 'enable']);

    Route::apiResource('member/groups', MemberGroupsController::class);
    Route::apiResource('cooperate', CooperateController::class);
    Route::put('member/groups/enable/{id}', [MemberGroupsController::class, 'enable']);
    Route::get('members/refund_order/{id}', [MembersController::class, 'refundLevelOrder']);

    Route::apiResource('price_log',MembersPriceLogController::class);
    //next
});
